#include <stdlib.h>
#include <stdio.h>
#include "tree.h"

int main(int argc, char **argv) {
	Tree tree = insert(NULL, 5);
	tree = insert(tree, 9);
	tree = insert(tree, 8);
	tree = insert(tree, 2);
	tree = insert(tree, 3);
	tree = insert(tree, 4);
	tree = insert(tree, 6);
	tree = insert(tree, 7);

	// printTree(tree, ORDER_PRE);
	// printf("-------------------\n");
	// printTree(tree, ORDER_MID);
	// printf("-------------------\n");
	// printTree(tree, ORDER_POST);

	PtrToNode minNode = findMin(tree);
	printNode(minNode);
	printNode(findMax(tree));
	printf("-------------------\n");
	
	deleteNode(tree, 5);
	printTree(tree, ORDER_PRE);
}